<?php

namespace app\index\controller\inquiry;

use addons\shop\model\Inquiry;
use app\common\controller\Frontend;

class Problem extends Frontend
{
    protected $layout      = 'default';
    protected $noNeedRight = '*';

    public function index()
    {
        $status = input('status');
        $query  = Inquiry::where([
            'delete_time' => ['null', ''],
            'uid'         => $this->auth->id
        ]);
        if ($status != 22) {
            $query->where('status', $status);
        }
        $list = $query->paginate(10, '', ['query' => ['status' => $status]]);
        return $this->fetch('', [
            'status' => $status,
            'data'   => $list,
            'title'  => '我的订单',
            'u_type' => 2
        ]);
    }
}
